<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<form action="#" method="get">
			<input type="text" name="username" id="username" />
			<input type="button" onclick="func()" value="验证" />
		</form>
		
		
	</body>
	
	<script>
		function func(){    
			let usernameValue = document.getElementById("username").value;
			let usernameRegex = /(^1[3578]\d{9}$)|(^\w+@\w+\.\w+$)/;   // 1[3578]\d{9}     11111504531399900000
		
			if(usernameRegex.test(usernameValue)){
				alert("满足要求");
			}else{
				alert("不满足要求");
			}
		
		}
	</script>
	
	
</html>
